<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员管理-后台管理系统</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/css.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/admin/js/jquery.min.js"></script>
<!-- <script type="text/javascript" src="js/page.js" ></script> -->
</head>

<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="${pageContext.request.contextPath}/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;-</span>&nbsp;会员管理
			</div>
		</div>


		<div class="page">
			<!-- user页面样式 -->
			<form>
				<div class="cfD">
					<a class="addA addA1" href="vipadd.jsp">新增会员+</a>
				</div>
			</form>
			<div class="connoisseur">
				<!-- user 表格 显示 -->
				<div class="conShow">
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="66px" class="tdColor tdC">序号</td>
							<td width="266px" class="tdColor">用户id</td>
							<td width="435px" class="tdColor">昵称</td>
							<td width="400px" class="tdColor">电话</td>
							<td width="230px" class="tdColor">qq</td>
							<td width="230px" class="tdColor">用户名</td>
							<td width="266px" class="tdColor">家庭电话</td>
							<td width="435px" class="tdColor">用户类型</td>
							<td width="400px" class="tdColor">积分</td>
							<td width="230px" class="tdColor">学校</td>
							<td width="130px" class="tdColor">邮箱</td>
							<td width="435px" class="tdColor">个人介绍</td>
							<td width="400px" class="tdColor">性别</td>
							<td width="130px" class="tdColor">头像</td>
							<td width="130px" class="tdColor">操作</td>
						</tr>
						<c:forEach var="user" items="${sessionScope.users}" varStatus="v">
							<tr>
								<td>${v.count}</td>
								<td style="width:265px;">${user.userId}</td>
								<td>${user.nickname}</td>
								<td>${user.phone}</td>
								<td>${user.qq}</td>
								<td>${user.username}</td>
								<td>${user.familyPhone}</td>
								<td>${user.type}</td>
								<td>${user.integral}</td>
								<td>${user.school}</td>
								<td>${user.email}</td>
								<td>${user.introduce}</td>
								<td>${user.gender}</td>
								<td><img src="../upload/${user.picture}" width="25px" height="25px"/></td>
								<%--&PR=${user.productNum}&NA=${user.name}&PR=${user.price}&DI=${user.discountPrice}&IM=${user.img}&${user.discount}&${user.status}&${user.type}&${user.fitGrade}&${user.author}&${user.publishHouse}&${user.publishDate}&${user.integral}&${user.uploadTime}--%>
								<td>
									<%--<a href="${pageContext.request.contextPath}/book?method=deleteuser&?id=${user.id}&admin=admin}">--%>
									<img class="operation delban" src="img/delete.png" onclick="dj(${user.phone})">
										<%--suppress CheckValidXmlInScriptTagBody --%>
								</td>
							</tr>

						</c:forEach>
					</table>

					<div class="paging">
                        <table>
                            <tr>
								<c:if test="${sessionScope.currentPage7 > 1}">
									<a href="${pageContext.request.contextPath }/user?method=findByPage&pageIndex7=${sessionScope.currentPage7-1}">上一页</a>
								</c:if>
								<c:if test="${sessionScope.currentPage7 <= 1}">
								<a style="background-color:gray;">上一页</a>
								</c:if>

								<c:forEach begin="1" end="${sessionScope.userPage}" varStatus="v">
									<a href="${pageContext.request.contextPath }/user?method=findByPage&pageIndex7=${v.count}">${v.count} &nbsp;</a>
								</c:forEach>

								<c:if test="${sessionScope.currentPage7 < sessionScope.userPage }">
									<a href="${pageContext.request.contextPath }/user?method=findByPage&pageIndex7=${sessionScope.currentPage7+1}">下一页</a>
								</c:if>
								<c:if test="${sessionScope.currentPage7 >= sessionScope.userPage}">
								<a style="background-color:gray;">下一页</a>
								</c:if>
                            </tr>
                        </table>
                    </div>
				</div>
				<!-- user 表格 显示 end-->
			</div>
			<!-- user页面样式end -->
		</div>

	</div>


	<!-- 删除弹出框 -->
	<div class="banDel">
		<div class="delete">
			<div class="close">
				<a><img src="img/shanchu.png" /></a>
			</div>
			<p class="delP1">你确定要删除此条记录吗？</p>
			<p class="delP2">
				<a href="" id="aSub" class="ok yes">确定</a><a class="ok no">取消</a>
			</p>
		</div>
	</div>
<%--suppress CheckValidXmlInScriptTagBody --%>
	<script>
        function dj(phone) {
            document.querySelector("#aSub").href = "${pageContext.request.contextPath}/user?method=delete&phone="+phone;
        }
	</script>
	<!-- 删除弹出框  end-->
</body>

<script type="text/javascript">
// 广告弹出框
$(".delban").click(function(){
  $(".banDel").show();
});
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
// 广告弹出框 end
</script>
</html>